﻿using AiXiu.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AiXiu.IDAL
{
    /// <summary>
    /// 视频数据服务接口
    /// </summary>
    public interface IVideoDAL  
    {
        /// <summary>
        /// 数据库添加视频
        /// </summary>
        /// <param name="video"></param>
        /// <returns></returns>
        TBVideos AddVideo(TBVideos video);

        /// <summary>
        /// 获取待处理的视频id集合
        /// </summary>
        /// <returns></returns>
        List<string> GetInProcessVideoIds();

        /// <summary>
        /// 批量更新视频信息（封面地址和状态）
        /// </summary>
        /// <param name="videos"></param>
        void UpdateVideos(List<VideoInfo> videos);

        /// <summary>
        /// 通过用户id获取视频列表
        /// </summary>
        /// <param name="userId">用户id</param>
        /// <returns></returns>
        List<TBVideos> GetVideosByUserId(int userId);

        /// <summary>
        /// 根据视频id删除视频
        /// </summary>
        /// <param name="videoId">视频id</param>
        void DeleteVideo(string videoId);

        /// <summary>
        /// 获取可播放的视频列表
        /// </summary>
        /// <returns></returns>
        List<TBVideos> GetVideos();

        /// <summary>
        /// 根据视频id获取视频信息
        /// </summary>
        /// <param name="videoId"></param>
        /// <returns></returns>
        TBVideos GetVideoByVideoId(string videoId);
    }
}
